//
//  UserLabelItem.m
//  CoolTennisBall
//
//  Created by Coollang on 16/8/29.
//  Copyright © 2016年 CoolLang. All rights reserved.
//

#import "UserLabelItem.h"


@implementation UserLabelItem
+ (instancetype)itemWithIcon:(NSString *)icon labelItemWithTitle:(NSString *)title andValue:(NSString *)labelText {
    
   UserLabelItem *item = [UserLabelItem labelItemWithTitle:title andValue:labelText];
    
    item.icon = icon;
    
    return item;
}

+ (instancetype)labelItemWithTitle:(NSString *)title andValue:(NSString *)labelText {
    UserLabelItem *item = [UserLabelItem itemWithTitle:title];
    
    // 判断事件是否有默认值
//    if (item.value == nil) {
//        NSLog(@"%@",item.value);
        // 默认值
        item.labelText = labelText;
//    }
    
    return item;
}

//- (void)setLabelText:(NSString *)labelText {
//    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
//    [defaults setObject:labelText forKey:self.title];
//    
//    [defaults synchronize];
//}
//- (NSString *)value {
//    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
//    return [defaults objectForKey:self.title];
//}

@end
